#pragma once

#include "Singleton.h"
#include "LinkedList.h"
#include "PkgBuf.h"

typedef CLinkedList<PkgBuf> CPkgBufList;
typedef CPkgBufList::Node PkgBufNode;

class CPkgBufMgr : public CSingleton<CPkgBufMgr>
{
    friend class CSingleton;

public:
    ~CPkgBufMgr();

private:
    CPkgBufMgr();

public:
    PkgBuf *GetPkgBuf();
    void FreePkgBuf(PkgBuf *pb);

    void Destroy();

private:
    CPkgBufList m_lstFree;
};
